import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryApi } from '@/apis/layout.js'

export const usecatelistStore = defineStore('catelist', () => {
    //获取导航列表
    //保存获取的数据列表
    let catelist = ref([])
    //获取列表
    const getCatelist = async () => {
        const res = await getCategoryApi()
        catelist.value = res.result
    }
    return { catelist, getCatelist}
})
